---
sidebar_position: 11
description: Learn how to use the standby function in DeviceScript to put your
  ESP32 device into the lowest power sleep mode for a specified time and save on
  battery power.
---

# Low Power

## Standby

The `standby` function attempt to put devices into lowest power sleep mode for a specified time,
most likely involving a full reset on wake-up.

```ts
import { standby } from "@devicescript/runtime"

console.log("going to sleep for 1 hour...")
// highlight_next_line
await standby(3600_000) // shut down for 1 hour
```

Use allow to save on battery power for long running operation where the device should mostly be idle in between sensor readings.

:::note

`standby` is available on ESP32 chip currently.

:::
